#ifndef JAE_LIGHT_H_
#define JAE_LIGHT_H_

#include "object.h"

/****************************************************//**
 * Project-Namespace
 ********************************************************/
namespace jae
{

/****************************************************//**
 * Saves the position and roation of a node.
 ********************************************************/
class Light : public Object
{
public:

    Light();
    virtual ~Light();
    virtual void render();
    
    void setLightIndex(GLenum aIndex);  //TODO sollte nur private sein
    GLenum getLightIndex();

    void setAmbient(GLfloat aVector[4]);
    void setAmbient(GLfloat aRed, GLfloat aGreen, GLfloat aBlue, GLfloat aAlpha);
    void setDiffuse(GLfloat aVector[4]);
    void setDiffuse(GLfloat aRed, GLfloat aGreen, GLfloat aBlue, GLfloat aAlpha);
    void setSpecular(GLfloat aVector[4]);
    void setSpecular(GLfloat aRed, GLfloat aGreen, GLfloat aBlue, GLfloat aAlpha);
    void setAttenuation(GLfloat aConstant, GLfloat aLinear, GLfloat aQuadratic);

    void setSpotExponent(GLfloat aValue);
    void setSpotCutoff(GLfloat aValue);
    void setDefaultValues();
    
    void setDirectionalLight(bool aValue);

 private:
    void setLightValues();
    void renderCube();
    void renderArrow();
    void renderArrows();
       
    GLenum _lightIndex;   
    bool _directionalLight;
    
    GLfloat _ambient[4];
    GLfloat _diffuse[4];
    GLfloat _specular[4];
    GLfloat _attenuationConst;
    GLfloat _attenuationLinear;
    GLfloat _attenuationQuadratic;
    GLfloat _spotCutoff;
    GLfloat _spotExponent;
    
};


} //namespace

#endif /*JAE_LIGHT_H_*/
